<?php
/**
 * Created by PhpStorm.
 * User: 共赢岛
 * Date: 2025/8/30
 * Time: 11:33
 */

namespace App\Http\Controllers\API;

use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;

class UserController extends Controller
{
    public function userInfo()
    {
        $user = Auth::user();

        $user->workshop_title = $user->workshop->title;

        $user->role_title = $user->roles[0]['name'];

        return $this->success($user);
    }
}